package com.webSite.demo.cy.indie.controller;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;

import com.webSite.demo.cy.bean.HomeContactUs;
import com.webSite.demo.cy.mapper.HomeContactUsMapper;

@Controller  
@EnableAutoConfiguration
public class ContactUsController {

	@Autowired
	HomeContactUsMapper contactUsMapper;
	
	
	@RequestMapping("/contact.html")  
    String contact(Model model) {
		List<HomeContactUs> list = contactUsMapper.findAllInfo();
		if(!list.isEmpty()) {
			model.addAttribute("list", list);
		}
		model.addAttribute("menu", "contactUs");
        return "contact";
    }
}
